/*
//  JTRule.h
//  Agate Rule Tester
//
//  Created by Jim Turner on 12/9/05.

License: GNU General Public License
This program is free software; you can redistribute it and/or modify it under 
the terms of the GNU General Public License as published by the Free Software 
Foundation; either version 2 of the License, or (at your option) any later 
version.

This program is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
details.

You should have received a copy of the GNU General Public License along 
with this program; if not, write to the Free Software Foundation, Inc., 
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
http://www.gnu.org/licenses/licenses.html#GPL

*/

#import <Cocoa/Cocoa.h>


@interface JTRule : NSObject 
{
	int activeState;
	NSString *find;
	NSString *replace;
	BOOL caseSensitive;
	BOOL exhaustiveReplace;
	BOOL replaceFirst;
	BOOL replaceLast;
	BOOL perlRegex;
	NSString *translationInfo;
}

#pragma mark Initialization/Deallocation functions
-(id) initWithRule:(JTRule *)rule;
-(id) initWithDictionary:(NSDictionary *)ruleDict;

#pragma mark Setter functions
-(void) setActive:(int) state;
-(void) setFind:(NSString *) string;
-(void) setReplace:(NSString *) string;
-(void) setIsCaseSensitive:(BOOL) state;
-(void) setIsExhaustiveReplace:(BOOL) state;
-(void) setIsReplaceFirstOnly:(BOOL) state;
-(void) setIsReplaceLastOnly:(BOOL) state;
-(void) setIsRegex:(BOOL) state;
-(void) setTranslationInformation:(NSString *) string;

#pragma mark Getter functions
-(int) activeState;
-(NSString *) find;
-(NSString *) replace;
-(BOOL) isCaseSensitive;
-(BOOL) isExhaustiveReplace;
-(BOOL) isReplaceFirstOnly;
-(BOOL) isReplaceLastOnly;
-(BOOL) isRegex;
-(NSString *) translationInformation;

#pragma mark Interface functions
-(NSDictionary *) returnObjectAsDictionary;

@end
